public class h_13 {
    public static void main(String[] args) {
        for(long i=0;i<100000;i++){
            double n=i;
            if(((double)Math.sqrt(n+100)%(long)Math.sqrt(n+100)==0)
                    &&((double)Math.sqrt(n+268)%(long)Math.sqrt(n+268)==0)){
                System.out.print(i+" ");
            }
        }
    }
}
